how to play sound after pressing a button in tkinter

121

how to play sound after pressing a button in tkinter -

from Tkinter import *
import mp3play

root = Tk() # create tkinter window

f = mp3play.load('Sound.mp3'); play = lambda: f.play()
button = Button(root, text = 'Play', command = play)

button.pack()
root.mainloop()

Comments

Submit
0 Comments